#pragma once
#include <iostream>
#include <sstream>
#include <string>
#include "Types.h"
#include "Engine.h"
using namespace std;


class Uci
{
private:
	Engine* engine;
public:
	Uci(Engine* eng);
	~Uci(void);

	void Loop();

  // Keep track of position keys along the setup moves (from start position to the
  // position just before to start searching). This is needed by draw detection
  // where, due to 50 moves rule, we need to check at most 100 plies back.
  //StateInfo StateRingBuf[102];
  //StateInfo *SetupState;// = StateRingBuf;

  void set_option(istringstream& up);
  void set_position(Position& pos, istringstream& up);
  void go(Position& pos, istringstream& up);
  void perft(Position& pos, istringstream& up);
  long long perft(Position& pos, int depth);

  void test(istringstream& up);
  void bench(istringstream& up);

  //int system_time();
  //Move move_from_uci(Position& pos, string token);
  
  //Move move_from_uci(const Position& pos, const string& str);
};
